// components/headerBar/headerBar.js
const app = getApp();
Component({
  properties: {
    isShow: { // 是否显示自定义的导航按钮       
      type: Boolean,
      value: false
    },
    title_height: { //             
      type: String,
      value: app.config.title_height,
    },
    titleIcon_height: {
      type: String,
      value: app.config.titleIcon_height,
    },
    titleIcon_width: {
      type: String,
      value: app.config.titleIcon_width,
    },
    statusbarHeight: {
      type: String,
      value: app.config.statusbarHeight,
    },
    title_top: {
      type: String,
      value: app.config.title_top,
    },
    title_text: {
      type: String,
      value: app.config.title_text,
    },
    bgColor:{
      type: String,
      value: '#ffffff'
    },
    fontColor:{
      type: String,
      value: '#000000'
    },
    btnBgColor: { // 是否显示主页            
      type: String,
      value: "#ffffff"
    },
    imgLeft: {
      type: String,
      value: "../images/back.png"
    },
    imgRight: {
      type: String,
      value: "../images/homeSelector.png"
    }
  },
  methods: {
    _goBack: function () {
      wx.navigateBack({
        delta: 1
      });
    },
    _goHome: function () {
      wx.switchTab({
        url: "../../pages/index/index"
      });
    }
  }
})